/**
 * @param {character[]} s
 * @return {void} Do not return anything, modify s in-place instead.
 */
// var reverseString = function (s) {
//   let left = 0
//   let right = s.length - 1
//   while (left < right) {
//     const temp = s[left]
//     s[left] = s[right]
//     s[right] = temp
//     left++
//     right--
//   }
//   return s
// }

var reverseString = function (s) {
  let left = -1
  let right = s.length
  while (left++ < right--) {
    ;[s[left], s[right]] = [s[right], s[left]]
  }
  return s
}
